/* GUI CONVERTED from rwopmiq.p (converter v1.76) Sat Apr  6 12:09:11 2002 */
/* rwopmiq.p - STANDARD OPERATION INQUIRY                                     */
/* Copyright 1986-2002 QAD Inc., Carpinteria, CA, USA.                        */
/* All rights reserved worldwide.  This is an unpublished work.               */
/* $Revision: 1.7.1.4 $                                                       */
/*V8:ConvertMode=Report                                                       */
/* REVISION: 4.0      LAST MODIFIED: 03/18/88   BY: WUG *A194                 */
/* REVISION: 5.0      LAST MODIFIED: 12/29/88   BY: RL                        */
/* REVISION: 5.0      LAST MODIFIED: 01/16/89   BY: flm *A611                 */
/* REVISION: 5.0          LAST EDIT: 05/03/89   BY: WUG *B098*                */
/* Revision: 7.3          Last edit: 11/19/92   By: jcd *G339*                */
/* REVISION: 7.3          LAST EDIT: 02/24/93   BY: sas *G740*                */
/* REVISION: 7.3          LAST EDIT: 08/28/94   BY: srk *GL73*                */
/* REVISION: 8.5      LAST MODIFIED: 07/30/96   BY: *J12T* Sue Poland         */
/* REVISION: 8.6          LAST EDIT: 10/08/97   BY: mur *K0NK*                */
/* REVISION: 8.6E     LAST MODIFIED: 02/23/98   BY: *L007* A. Rahane          */
/* REVISION: 8.6E     LAST MODIFIED: 10/04/98   BY: *J314* Alfred Tan         */
/* REVISION: 9.1      LAST MODIFIED: 03/24/00   BY: *N08T* Annasaheb Rahane   */
/* REVISION: 9.1      LAST MODIFIED: 08/12/00   BY: *N0KP* Mark Brown         */
/* Old ECO marker removed, but no ECO header exists *F0PN*                    */
/* $Revision: 1.7.1.4 $   BY: Jean Miller        DATE: 04/06/02  ECO: *P055*  */
/******************************************************************************/
/* All patch markers and commented out code have been removed from the source */
/* code below. For all future modifications to this file, any code which is   */
/* no longer required should be deleted and no in-line patch markers should   */
/* be added.  The ECO marker should only be included in the Revision History. */
/******************************************************************************/

/* Note: With J12T, rwopmiq.p replaces fsopmiq.p. This inquiry displays both
   Service and non-Service operations.  */

/* DISPLAY TITLE */

/*GUI preprocessor directive settings */
&SCOPED-DEFINE PP_GUI_CONVERT_MODE REPORT

{mfdtitle.i "b+ "}

define variable std_op like opm_std_op label "From Standard Operation".
define variable service-op as character format "x(1)" column-label "Svc".


/*GUI preprocessor Frame A define */
&SCOPED-DEFINE PP_FRAME_NAME A

FORM /*GUI*/ 
   
 RECT-FRAME       AT ROW 1 COLUMN 1.25
 RECT-FRAME-LABEL AT ROW 1 COLUMN 3 NO-LABEL VIEW-AS TEXT SIZE-PIXELS 1 BY 1
 SKIP(.1)  /*GUI*/
space(1)
   std_op
   opm_desc no-label
with frame a side-labels width 80 attr-space NO-BOX THREE-D /*GUI*/.

 DEFINE VARIABLE F-a-title AS CHARACTER INITIAL "".
 RECT-FRAME-LABEL:SCREEN-VALUE in frame a = F-a-title.
 RECT-FRAME-LABEL:HIDDEN in frame a = yes.
 RECT-FRAME:HEIGHT-PIXELS in frame a =
  FRAME a:HEIGHT-PIXELS - RECT-FRAME:Y in frame a - 2.
 RECT-FRAME:WIDTH-CHARS IN FRAME a = FRAME a:WIDTH-CHARS - .5.  /*GUI*/

/*GUI preprocessor Frame A undefine */
&UNDEFINE PP_FRAME_NAME



/* SET EXTERNAL LABELS */
setFrameLabels(frame a:handle).

FORM /*GUI*/ 
   opm_std_op
   opm_desc
   opm_wkctr
   opm_setup
   opm_run
   opm_move
   service-op
with STREAM-IO /*GUI*/  frame b width 80 no-attr-space down.

/* SET EXTERNAL LABELS */
setFrameLabels(frame b:handle).

{wbrp01.i}
repeat:

   if c-application-mode <> 'web' then
      update std_op with frame a
   editing:
      /* FIND NEXT/PREVIOUS RECORD */
      {mfnp05.i opm_mstr opm_std_op yes opm_std_op "input std_op"}
      if recno <> ? then
         display
            opm_std_op @ std_op opm_desc
         with frame a.
   end. /* editing on std_op */

   {wbrp06.i &command = update &fields = "  std_op" &frm = "a"}

   if (c-application-mode <> 'web') or
      (c-application-mode = 'web' and
      (c-web-request begins 'data'))
   then do:

      find opm_mstr where opm_std_op = std_op no-lock no-error.

      if available opm_mstr then
         display opm_desc with frame a.
      else
         display " " @ opm_desc with frame a.

      clear frame b all.

   end.

   /* OUTPUT DESTINATION SELECTION */
   {gpselout.i &printType = "terminal"
               &printWidth = 80
               &pagedFlag = " "
               &stream = " "
               &appendToFile = " "
               &streamedOutputToTerminal = " "
               &withBatchOption = "no"
               &displayStatementType = 1
               &withCancelMessage = "yes"
               &pageBottomMargin = 6
               &withEmail = "yes"
               &withWinprint = "yes"
               &defineVariables = "yes"}
/*GUI*/ RECT-FRAME:HEIGHT-PIXELS in frame a = FRAME a:HEIGHT-PIXELS - RECT-FRAME:Y in frame a - 2.


   for each opm_mstr no-lock where opm_std_op >= std_op
   with frame b width 80 no-attr-space:

      
/*GUI*/ {mfguichk.i } /*Replace mfrpchk*/


      display
         opm_std_op
         opm_desc
         opm_wkctr
         opm_setup
         opm_run
         opm_move WITH STREAM-IO /*GUI*/ .

      /* FOR SERVICE OPERATIONS, DISPLAY '*' IN "Svc" COLUMN */
      display
         "*" when (opm_fsm_type = "FSM") @ service-op
         " " when (opm_fsm_type = "")    @ service-op WITH STREAM-IO /*GUI*/ .

      down 1 with frame b.

   end.    /* for each opm_mstr */

   {mfreset.i}
/*GUI*/ {mfgrptrm.i} /*Report-to-Window*/

   {pxmsg.i &MSGNUM=8 &ERRORLEVEL=1}

end.   /* repeat */

{wbrp04.i &frame-spec = a}
